import req from '@/utils/request'

// 获取权限列表
export function getPerList() {
  return req({
    url: '/admin/power/data',
    method: 'get'
  })
}

// 增加权限
export function addPower(data) {
  return req({
    url: '/admin/power/save',
    method: 'post',
    data
  })
}

// 删除权限
export function delPower(id) {
  return req({
    url: `/admin/power/remove/${id}`,
    method: 'delete'
  })
}

// 批量删除权限
export function batchPower(data) {
  return req({
    url: '/admin/power/batchRemove',
    method: 'post',
    data
  })
}

// 编辑权限
export function editPower(data) {
  return req({
    url: '/admin/power/update',
    method: 'put',
    data
  })
}

// 激活用户 / 禁用账号
export function enablePower(data) {
  return req({
    url: '/admin/power/enable',
    method: 'put',
    data
  })
}
export function disablePower(data) {
  return req({
    url: '/admin/power/disable',
    method: 'put',
    data
  })
}

